package org.example.java.base;

/**
 * User: ZhangJuntao
 * Date: 14-1-3
 * Time: 上午11:12
 */
public class MathTest {
  private static void testMath() {
    System.out.println("\n== testMath ==");
    System.out.printf("Math.sqrt(4) is %s.%n", Math.sqrt(4));
    System.out.printf("Math.log(Math.E) is %s.%n", Math.log(Math.E));//loge(e)  ln(e)
    System.out.printf("Math.log10(100) is %s.%n", Math.log10(100));
    System.out.printf("Math.log1p(Math.E - 1) is %s.%n", Math.log1p(Math.E - 1)); //log(x+1)= log1p(x)
  }

  public static void main(String[] args) {
    testMath();
  }
}
